package com.ruoyi.table.config;

import org.junit.Test;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;


/**
 * @author 韩国伟
 * @version 1.0
 * @description: 测试
 * @date 2023/2/24 9:13
 */
public class BCTest {


    @Test
    public void test01(){
        BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
        String pwd="123";
        String encode = bCryptPasswordEncoder.encode(pwd);
        System.out.println(encode);
        boolean matches = bCryptPasswordEncoder.matches(pwd, encode);

        System.out.println("是否一致:"+matches);
    }



}
